// pages/dangjian/dangjianyaowen.js
const app = getApp()

Page({
  data: {
    url: app.globalData.url,
  },
  //事件处理函数
  onLoad: function () { 
    var that = this;
    wx.request({
      url: app.globalData.url + '/partyBuilding/index',
      responseType: 'text',
      success: function (res) {
        console.log(res);
        if (res.data.result.baners[0][0]){
          that.setData({
            baners: res.data.result.baners[0],
          })
        }
        if (res.data.result.menu[0][0]) {
          that.setData({
            menus: res.data.result.menu[0],
          })
        }
        if (res.data.result.news[0]) {
          that.setData({
            news: res.data.result.news[0],
          })
        }
        if (res.data.result.event[0][0]) {
          that.setData({
            event: res.data.result.event[0],
          })
        }
        if (res.data.result.classList[0][0]) {
          that.setData({
            classList: res.data.result.classList[0]
          })
        }
        
        
      },
    })
  }

})
